<template>
	<view class="page" :style="themeColor">
		<view class="flex benben-position-layout flex flex-wrap align-center agreement_flex_0"
			:style="{height:(64+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub agreement_fd0_0'>
				<view class='flex flex-wrap align-center agreement_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  agreement_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">&#xE794;</text>
				</view>
				<view class='flex flex-wrap align-stretch justify-center'>
					<text class='agreement_fd0_0_c1_c0'>完善资料</text>
				</view>
				<view class='flex flex-wrap align-center agreement_fd0_0_c0'>
				</view>
			</view>
		
		</view>
		<view :style="{height: (64+StatusBarRpx)+'rpx'}"></view>
		<view class="flex flex-direction flex-wrap align-stretch">
			<view class='flex flex-direction flex-wrap align-center login_fd0_0'>
				<image class='login_fd0_0_c0' mode="aspectFill" :src='STATIC_URL+"2.png"'></image>
				<!-- <view class="logo_name">智海马科技</view> -->
			</view>

			<view class='flex flex-wrap align-center login_fd0_1'>
				<view class="input_name flex align-center justify-between">
					<text>用户名</text>
					<text class="name_line"></text>
				</view>
				<input class='flex-sub login_fd0_1_c1' type="text" placeholder="请输入用户名" confirm-type="done"
					:maxlength="15" placeholder-style="color:rgba(153, 153, 153, 1);font-size:25rpx"
					v-model="nickname" />
			</view>
			<view class='flex flex-wrap align-center login_fd0_1' @tap.stop="pickerDiy1683966462102=true">
				<view class="input_name flex align-center justify-between">
					<text>性别</text>
					<text class="name_line"></text>
				</view>
				<input class='flex-sub login_fd0_1_c1' type="text" placeholder="请选择性别" confirm-type="done"
					:maxlength="-1" placeholder-style="color:rgba(153, 153, 153, 1);font-size:25rpx" :disabled="true"
					v-model="sex_name" />
				<image class="sex_img" :src='STATIC_URL+"12.png"' mode=""></image>
			</view>
			<view class='flex flex-wrap align-center login_fd0_1'>
				<view class="input_name flex align-center justify-between">
					<text>小区名称</text>
					<text class="name_line"></text>
				</view>
				<input class='flex-sub login_fd0_1_c1' type="text" placeholder="请输入小区名称" confirm-type="done"
					:maxlength="-1" placeholder-style="color:rgba(153, 153, 153, 1);font-size:25rpx"
					v-model="cell_name" />
			</view>
			<view class='flex align-center justify-center'>
				<button class='login_fd0_4_c0' @tap.stop="saveInformation()">开始训练</button>
			</view>
			
		</view>

		
		
		<benben-picker ref="benbenWritePickerCodepicker2" :visible.sync="pickerDiy1683966462102"
			:value.sync='sex' :options='sex_options' mode='selector' :mask-show='true' :timeout='true'
			:picker-height='88' default-type='value' :default-props='{ "label": "name", "value": "value" }' @change="selectSex">
			<template #picker-header>
				<view class='flex flex-wrap align-center justify-between myInformation_picker2_0'>
					<text class="myInformation_picker2_0_c2" @tap="$refs.benbenWritePickerCodepicker2.cancel()">取消</text>
					<text class="myInformation_picker2_0_c2">选择性别</text>
					<text class='myInformation_picker2_0_c2'
						@tap="$refs.benbenWritePickerCodepicker2.pickerConfirm()">确认</text>
				</view>
			</template>
		</benben-picker>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},


		data() {
			return {
				"pickerDiy1683966462102": false,
				"sex_options": [{
					"name": "保密",
					"value": "0",
					"image": ""
				},{
					"name": "男",
					"value": "1",
					"image": ""
				}, {
					"name": "女",
					"value": "2",
					"image": ""
				}],
				"sex": 0,
				"sex_name": '保密',
				"nickname": "",
				"cell_name": "",
				
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {

		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			async saveInformation() {
				//请求方法
				//数据验证

				let datauserInfo = await this.$api.post(global.apiUrls.post5cb54af125f1c, {
					nickname: this.nickname,
					gender: this.sex,
					cell_name: this.cell_name
				});

				if (datauserInfo.data.code != 1) {
					this.$message.info(datauserInfo.data.msg);
					return
				}
				this.$message.info(datauserInfo.data.msg);
				setTimeout(() => {
					uni.reLaunch({
						url: '/pages/tabBar/index/index'
					})
				}, 800)
			},
			selectSex(e) {
				this.sex_name = e.result;
			}
		}
	};
</script>
<style lang="scss" scoped>
	.sex_img {
		width: 12rpx;
		height: 20rpx;
	}
	.input_name {
		width: 125rpx;
		font-size: 25rpx;
		color: #333;
		margin-right: 25rpx;
		.name_line {
			width: 1px;
			height: 30rpx;
			background: #DDDDDD;
		}
	}
	.logo_name {
		font-size: 28rpx;
		color: #4087FD;
		margin: 25rpx auto 0;
	}

	.title_text {
		margin: 86rpx auto 50rpx;
		color: #DDDDDD;
		.title_text_1 {
			color: #666666;
			margin: 0 18rpx;
			font-size: 25rpx;
		}
	}

	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: rgba(255, 255, 255, 1);
		// background: url(/static/images/1.png) no-repeat, #fff;
		// background-size: 100% auto !important;
	}

	.login_fd0_5_c1 {
		background: rgba(191, 191, 191, 1);
		width: 1rpx;
		height: 24rpx;
		background-size: 100% auto !important;
		margin: 0rpx 32rpx 0rpx 32rpx;
	}

	.login_fd0_5_c0 {
		font-size: 20rpx;
		font-weight: 400;
		color: #999999;
		line-height: 40rpx;
	}

	.login_fd0_5 {
		line-height: 40rpx;
		margin: 50rpx 0rpx 0rpx 0rpx;
	}

	.login_fd0_4_c0 {
		background: #4087FD;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
		font-size: 25rpx;
		color: #fff;
		height: 68rpx;
		line-height: 68rpx;
		font-weight: 500;
		width: 625rpx;
		margin-top: 272rpx;
	}

	.login_fd0_3 {
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		margin: 32rpx 55rpx 48rpx 0rpx;
	}

	.login_fd0_2_c1_icon1 {
		// width: 88rpx;
		// line-height: 88rpx;
		text-align: center;
		font-size: 44rpx;
	}

	::v-deep .login_fd0_2_c1 {
		// height: 125rpx;
		// width: 570rpx;
		font-size: 25rpx;
		font-weight: 400;
		color: #333;
	}

	.login_fd0_2 {
		padding: 20rpx 40rpx 20rpx 40rpx;
		margin: 0rpx 63rpx 0rpx 63rpx;
		background: #f8f8f8;
		border-radius: 38rpx;
		margin-top: 40rpx;
	}

	.login_fd0_1_c1 {
		line-height: 45rpx;
		font-size: 25rpx;
		font-weight: 400;
		color: #333;
		width: 100%;
	}

	.login_fd0_1_c0 {
		width: 28rpx;
		height: 28rpx;
		margin: 0rpx 22rpx 0rpx 0rpx;
	}

	.login_fd0_1 {
		background: #f8f8f8;
		padding: 20rpx 40rpx 20rpx 40rpx;
		margin: 0rpx 63rpx 40rpx 63rpx;
		border-radius: 38rpx;
	}

	.login_fd0_0_c0 {
		width: 150rpx;
		height: 150rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;

	}

	.login_fd0_0 {

		// height: 600rpx;
		margin: 100rpx 0rpx 100rpx 0rpx;
	}

	.login_flex_1 {
		background: #fff;
		width: 100%;
		height: 300rpx;
		overflow: hidden;
		z-index: 10;
		bottom: calc(0rpx + var(--window-bottom));
		background-size: 100% auto !important;
	}

	.login_fd1_1 {
		width: 80rpx;
		height: 80rpx;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		margin: 40rpx 0rpx 0rpx 0rpx;
	}

	.login_fd1_0_c1 {
		line-height: 32rpx;
		font-size: 26rpx;
		font-weight: 400;
		color: #999999;
		padding: 0rpx 7rpx 0rpx 7rpx;
	}

	.login_fd1_0_c0 {
		background: rgba(238, 238, 238, 1);
		background-size: 100% auto !important;
		height: 1rpx;
		width: 157rpx;
	}
	
	.agreement_flex_0 {
		background: #fff;
		width: 100%;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
		border-bottom: 1px solid #eee;
	}
	
	.agreement_fd0_0_c1_c0 {
		font-size: 25rpx;
		font-weight: 500;
		color: #333;
		line-height: 64rpx;
	}
	
	.agreement_fd0_0_c0_c0 {
		font-size: 25rpx;
		color: #333;
	}
	
	.agreement_fd0_0_c0 {
		width: 50rpx;
		height: 50rpx;
	}
	
	.agreement_fd0_0 {
		padding: 0rpx 25rpx 0rpx 25rpx;
	}
	
	
	.myInformation_picker2_0_c2 {
		color: #333333;
		font-size: 25rpx;
	}
	
	.myInformation_picker2_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		padding: 0rpx 20rpx 0rpx 20rpx;
		line-height: 64rpx;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
		background-size: 100% auto !important;
	}
</style>